import request from '@/api/request'
import { AxiosPromise } from 'axios'
import { CommentQuery, CommentPageResult, CommentVO } from './types'

/**
 * 查询当前用户的点赞的评论id
 *
 * @param id
 */
export function getCommentLikedById(id: number): AxiosPromise<CommentVO> {
  return request({
    url: '/api/v1/commentLike/' + id,
    method: 'get',
  })
}

/**
 * 点赞
 *
 * @param data
 */
export function liked(data: CommentVO) {
  return request({
    url: '/api/v1/commentLike/liked',
    method: 'post',
    data: data,
  })
}
